package Attachment;

import java.sql.*;
import java.text.*;


public class AttachmentItem {
	private int file_id;
	private int content_id;
	private String file_name;
	private long fileSize;
	private Timestamp date;
	private byte[] file;
	private Integer team_id;
	
	public Integer getTeam_id() {
		return team_id;
	}
	public void setTeam_id(Integer team_id) {
		this.team_id = team_id;
	}
	public byte[] getFile() {
		return file;
	}
	public void setFile(byte[] data) {
		this.file = data;
	}
	static private SimpleDateFormat format1=
			new SimpleDateFormat("yyyy-MM-dd");
	static private SimpleDateFormat format2=
			new SimpleDateFormat("yyyy-MM-dd HH:mm");
	
	
	public Timestamp getDate() {
		return date;
	}
	public void setDate(Timestamp date) {
		this.date = date;
	}
	public String getDateShort(){
		
		return format1.format(date);
	}
	public String getDateLong(){
		
		return format2.format(date);
	}
	
	public static SimpleDateFormat getFormat1() {
		return format1;
	}
	public static void setFormat1(SimpleDateFormat format1) {
		AttachmentItem.format1 = format1;
	}
	public static SimpleDateFormat getFormat2() {
		return format2;
	}
	public static void setFormat2(SimpleDateFormat format2) {
		AttachmentItem.format2 = format2;
	}
	
	
	public int getFile_id() {
		return file_id;
	}
	public void setFile_id(int file_id) {
		this.file_id = file_id;
	}
	public int getContent_id() {
		return content_id;
	}
	public void setContent_id(int content_id) {
		this.content_id = content_id;
	}
	public String getFile_name() {
		return file_name;
	}
	public void setFile_name(String file_name) {
		this.file_name = file_name;
	}
	public long getFileSize() {
		return fileSize;
	}
	public void setFileSize(long fileSize) {
		this.fileSize = fileSize;
	}
}
